#include "StdAfx.h"
#include "Evironment.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif



CEnvironment::CEnvironment(LPCTSTR Texture)
	:Tex(Texture, GL_Tex_BMP, 0)
{

}

CEnvironment::CEnvironment()
	:Tex("dixing.bmp", GL_Tex_BMP, 0)
{

}

CEnvironment::~CEnvironment(void)
{

}


void CEnvironment::RenderScene()
{
	glDisable(GL_LIGHTING);
	CTexture::Enable(true);
	Tex.Apply();
	glBegin(GL_QUADS);
	glTexCoord2f(0.0, 1.0);
	glVertex3f(-6.0, 0.0, -4.0);

	glTexCoord2f(0.0, 0.0);
	glVertex3f(-6.0, 0.0, 4.0);

	glTexCoord2f(1.0, 0.0);
	glVertex3f(6.0, 0.0, 4.0);

	glTexCoord2f(1.0, 1.0);
	glVertex3f(6.0, 0.0, -4.0);
	glEnd();

	CTexture::Enable(false);
	glEnable(GL_LIGHTING);
}

